import Toast from "./toast"
import { createApp } from 'vue'

export default {
    install: (app) => {
        // 实例化并加载组件
        const toast = createApp(Toast);
        const instantce = toast.mount(document.createElement("div"));
        // 挂载到body标签里面
        document.body.appendChild(instantce.$el);
        // 定义全局
        app.config.globalProperties.$toast = instantce 
    }
};